package com.igeek.base.ch02;

import java.util.Scanner;

/**
 * @Description TODO
 * @Author chenmin
 * @Date 2024/7/10 10:46
 */
public class Demo3 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入5个数字:");
        int[] a = new int[5];
        for (int i = 0; i < a.length; i++) {
            a[i] = input.nextInt();
        }

        for (int i = 0; i < a.length; i++) {
            System.out.println(i);
        }
        for (int i = 0; i < a.length; i++) {
            int b = a[1];
            System.out.println("最大值" + Math.max(b, a[i + 1]));
        }

    }
}
